package com.tairanchina.joat.core;

import com.tairanchina.joat.exception.JoatInstallException;

import java.util.List;

/**
 * Created by 周靖捷 on 2016/10/18.
 */
public class GenericPluginManager implements PluginManager {
    private java.util.Collection<PluginRegisterContext> registerContextCollection;

    public synchronized PluginRegisterContext install(PluginInstaller installer) throws JoatInstallException {
        for(PluginRegisterContext context:registerContextCollection){
            if(context.getPluginId().equals(installer.getPluginMeta().getPluginId())){
                throw new JoatInstallException("Plugin Already Exists;");
            }
        }





        return null;
    }

    public PluginRegisterContext update(PluginInstaller installer) {
        return null;
    }

    public PluginRegisterContext uninstall(PluginInstaller installer) {
        return null;
    }

    public PluginRegisterContext getInstalledPluginRegisterContext(String pluginId) {
        return null;
    }

    public List<PluginRegisterContext> list() {
        return null;
    }

    public java.util.Collection<PluginRegisterContext> getRegisterContextCollection() {
        return registerContextCollection;
    }

    public void setRegisterContextCollection(java.util.Collection<PluginRegisterContext> registerContextCollection) {
        this.registerContextCollection = registerContextCollection;
    }
}
